﻿@using OSS.Common.Authrization
@{
    ViewBag.CssStaticPath = "";
}
@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - OSS.Core</title>

    <environment names="Development">
        <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="~/css/site.css" />
        <link rel="stylesheet" href="~/css/user.css" />
    </environment>
    <environment names="Staging,Production">
        <link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
              asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
              asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
        <link rel="stylesheet" href="@ViewBag.CssStaticPath/css/site.min.css" asp-append-version="true" />
    </environment>
    @RenderSection("Header", required: false)
    @Html.Raw(JavaScriptSnippet.FullScript)
</head>
<body>
    <!-- Top menu -->
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-navbar-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">OSS Coder</a>
            </div>
            <div class="collapse navbar-collapse" id="top-navbar-1">
                @{
                    if (MemberShiper.IsAuthenticated)
                    {
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="http://www.cnblogs.com/osscoder/">会员中心</a></li>
                        </ul>
                    }
                    else
                    {
                        <ul class="nav navbar-nav navbar-right">
                            <li><a href="/user/login">登录</a></li>
                        </ul>
                    }
                }
            
            </div>
        </div>
    </nav>

    @RenderBody()
 <hr/>
    <footer class="container text-center">
        <p><span>&copy; 2017 - </span> <span> 京ICP备14021584号 </span>   @*<span class="pull-right">&nbsp;&nbsp;&nbsp;&nbsp;Power by:Linux Asp.net Core</span>*@</p>
    </footer>


    <environment names="Development">
        <script src="~/lib/jquery/dist/jquery.js"></script>
        <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
        <script src="~/js/site.js" asp-append-version="true"></script>
    </environment>
    <environment names="Staging,Production">
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"
                asp-fallback-src="@ViewBag.CssStaticPath/lib/jquery/dist/jquery.min.js"
                asp-fallback-test="window.jQuery"
                crossorigin="anonymous"
                integrity="sha384-K+ctZQ+LL8q6tP7I94W+qzQsfRV2a+AfHIi9k8z8l9ggpc8X+Ytst4yBo/hH+8Fk">
        </script>
        <script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
                asp-fallback-src="@ViewBag.CssStaticPath/lib/bootstrap/dist/js/bootstrap.min.js"
                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
                crossorigin="anonymous"
                integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa">
        </script>

        <script src="@ViewBag.CssStaticPath/js/site.min.js" asp-append-version="true"></script>
    </environment>

    @RenderSection("Scripts", required: false)

    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?6f2fef1607cb0896642163d1c0051053";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>

</body>
</html>
